from redis import StrictRedis
class Config:
    DEBUG = True
    SECRET_KEY = 'gZhupMxqe+RX4LbhIOJds7yHCnRN2fTqVMp/EaNGobc='

    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@localhost/test22'
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    SESSION_TYPE = 'redis'
    # 签名
    SESSION_USE_SIGNER = True
    PERMANENT_SESSION_LIFETIME = 86400

    REDIS_HOST = '127.0.0.1'
    REDIS_PORT = 6379
    SESSION_REDIS = StrictRedis(host=REDIS_HOST, port=REDIS_PORT)

class developmentConfig(Config):
    DEBUG = True

class productionConfig(Config):
    DEBUG = False
config = {
    'develop' : developmentConfig,
    'product' : productionConfig
}